package com.ac.scum.log.web.model.player.mapper;

import com.ac.scum.player.bean.PlayerCustomizePackage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.*;

@Mapper
public interface PlayerCustomizePackageMapper extends BaseMapper<PlayerCustomizePackage> {

    @Select("select pcp.*,scp.name as package_name from player_customize_package pcp " +
            "inner join server_customize_package scp on scp.id = pcp.package_id " +
            "where pcp.server_id = #{serverId} and ${where}")
    @Results({
            @Result(property = "packageName", column = "package_name"),
    })
    Page<PlayerCustomizePackage> findPlayerCustomizePackagePageByWhere(Page<?> page, @Param("serverId")Long serverId, @Param("where") String where);
}
